import Vue from 'vue'
import VueRouter from 'vue-router'


Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/goods',
    name: 'demo',
    component: ()=>import('@/views/demo/index')
  },
  {
    path: '/home',
    name: 'home',
    component: ()=>import('@/views/home/index')
  },
  {
    path: '/goods',
    name: 'goods',
    component: ()=>import('@/views/goods/index')
  },
  {
    path: '/details/:id',
    name: 'details',
    component: ()=>import('@/views/goods/details')
  },
  {
    path: '/shopping',
    name: 'shopping',
    component: ()=>import('@/views/goods/shopping')
  },
  
]

const router = new VueRouter({
  routes
})

export default router
